﻿@using ThuySan.Areas.Backend.Models
@model IEnumerable<dynamic>
@{
    Layout = "~/Areas/Backend/Views/Shared/_Layout.cshtml";
    Header header = new Header {
                                       Common = "ViewUserControl_Setting_Index",
                                       CurentCommon = "Category",
                                       PageHeader = "Manage Setting",
                                       Menulv1 = "02",
                                       Menulv2 = "0201"
                               };
    ViewData[Header.Key] = header;
    ViewBag.Title = "Manage Setting - Admin Control Panel";
}
@(Html.Telerik().Grid(Model).Name("grid").Columns(c =>
                                                      {
                                                          c.Bound(typeof(int), "SettingId").Title("#").Width(50);
                                                          c.Bound(typeof(string), "Name");
                                                          c.Bound(typeof(string), "Description");
                                                          c.Template(v => v.ProductId).ClientTemplate(Html.ActionLink("<span class=\"t-icon t-edit\"></span>", "Edit", new {
                                                                                                                                                                                   id = "<#=SettingId#>"
                                                                                                                                                                           }, new {
                                                                                                                                                                                          @class = "t-button t-button-icon t-grid-edit",
                                                                                                                                                                                  }).ToHtmlString()).Width(40);
                                                      }).Sortable(c => c.Enabled(true)).Filterable().DataKeys(c => c.Add("SettingId")).Pageable(c =>
                                                                                                                                       {
                                                                                                                                           c.Enabled(true);
                                                                                                                                           c.PageSize(25);
                                                                                                                                       }).DataBinding(c => c.Ajax().Select("GetList", "Setting")))